#pragma once

#include<iostream>
using namespace std;

namespace byh
{
	class string
	{
	public:
		string()
			:_str(nullptr)
			,_size(0)
			,_capacity(0)
		{}

		string(const char* str)
			:_size(strlen(str))
		{
			_capacity = _size;
			_str = new char[_size + 1];
			strcpy(_str, str);
		}

	private:
		char* _str;
		size_t _size;
		size_t _capacity;
	};
}

int main()
{
	string s("hello world");
	cout << s << endl;
	return 0;
}